import 'package:flutter/material.dart';

class PaddingTestRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Padding(
      padding: EdgeInsets.all(16.0), //四周留白
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start, //显式指定对齐方式为左对齐，排除对齐干扰
        children: <Widget>[
          Padding(
            padding: EdgeInsets.only(left: 8.0), //仅在左边增加
            child: Text('在左边留白'),
          ),
          Padding(
            padding: EdgeInsets.symmetric(vertical: 8.0),
            child: Text('在垂直（上下）方向留白'),
          ),
          Padding(
            padding: EdgeInsets.fromLTRB(20.0, .0, 20.0, 20.0),
            child: Text('分别在四边留白'),
          ),
        ],
      ),
    );
  }
}
